// -*- coding: utf-8 -*-
// @Time : 2024/8/31 上午12:52
// @Author : 423A35C7
// @Site : 
// @File : entity_store.js
// @Software: WebStorm

import { reactive } from 'vue'
import {AppstoreOutlined, ClockCircleOutlined} from "@ant-design/icons-vue";

export const entities_store = reactive({
    page_size: 10,
    current_file_index: 0,
    file_list: [],
    left_up_menu: [
        {
            key: 'by_time',
            label: "按时间",
            title: "按时间",
            icon: () => h(ClockCircleOutlined)
        },
        {
            key: 'by_category',
            label: '按类别',
            title: "按类别",
            icon: () => h(AppstoreOutlined),
        }
    ],
    left_up_menu_collapsed: false,
    current_file: null,
    sounds: {
        can_play_audio: false,
        audio_context: new AudioContext(),
        "num_at_once": {},
        "max_num_at_once": {
            "de": 1,
            "tuf": 1,
        },
        "audio_buffer": {},
    },
    dark_mode: true,
    set(key, value) {
        this[key] = value;
    },
    darkreader_theme: {
        brightness: 100,
        contrast: 90,
        sepia: 10,
    }
});
export const transactions_store = reactive({
    file_list : {
        width: 300,
        virtual_width: 300,
        min_width: 200,
        max_width: 600,
        show: ["by_time"],
    },
    pdf_preview : {
        width: 300,
        virtual_width: 300,
    },
    aside_drawer: true,
    window_width: window.innerWidth,
});
